package com.tubi.arrayFunction;

import java.util.Scanner;

public class Demo5ArrayFun {
    /*
    * 评委打分 去掉最大最小 求平均值
    * */
    public static void main(String[] args) {
        //动态创建数组
        int[] arr = new int[6];
        Scanner sc = new Scanner(System.in);

        for (int i = 0; i < arr.length; i++) {
            int num = sc.nextInt();
            if(num <0 || num>=100){
                System.out.println("重新输入");
                i--;
            }else {
                arr[i] = num;
            }
        }

        int d = arr[0];
        int x = arr[0];
        int he = 0;
        for (int i = 0; i < arr.length; i++) {
            if(d<arr[i]){
                d = arr[i];
            }
            if(x>arr[i]){
                x = arr[i];
            }
            he += arr[i];
        }

        int pj = (he - d -x) / 4;
        System.out.println(pj);



    }
}
